<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var diannao = new Object();
        diannao.name = '联想笔记本';
        diannao.xinghao = 5009;
        diannao.color = 'red';
        diannao.fu = function() {
            console.log('打游戏听音乐');
        }
        for (var key in diannao) {
            console.log(key);
            console.log(diannao[key]);
        }
        diannao.fu()
    </script>
</head>

<body>

</body>

</html>